home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 108 / MacAddict108.iso / Software / Internet & Communication / WordPress 1.5.1.dmg / wordpress / wp-admin / edit-pages.php < prev    next >
Encoding:
PHP Script  |  2005-02-11  |  1.4 KB  |  52 lines

  1. <?php
  2. require_once('admin.php');
  3. $title = __('Pages');
  4. $parent_file = 'edit.php';
  5. require_once('admin-header.php');
  6.  
  7. get_currentuserinfo();
  8. ?>
  9.  
  10. <div class="wrap">
  11. <h2><?php _e('Page Management'); ?></h2>
  12.  
  13. <?php
  14. if (isset($user_ID) && ('' != intval($user_ID))) {
  15.     $posts = $wpdb->get_results("
  16.     SELECT $wpdb->posts.*, $wpdb->users.user_level FROM $wpdb->posts
  17.     INNER JOIN $wpdb->users ON ($wpdb->posts.post_author = $wpdb->users.ID)
  18.     WHERE $wpdb->posts.post_status = 'static'
  19.     AND ($wpdb->users.user_level < $user_level OR $wpdb->posts.post_author = $user_ID)
  20.     ");
  21. } else {
  22.     $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
  23. }
  24.  
  25. if ($posts) {
  26. ?>
  27. <table width="100%" cellpadding="3" cellspacing="3"> 
  28.   <tr> 
  29.     <th scope="col"><?php _e('ID') ?></th> 
  30.     <th scope="col"><?php _e('Title') ?></th> 
  31.     <th scope="col"><?php _e('Owner') ?></th>
  32.     <th scope="col"><?php _e('Updated') ?></th>
  33.     <th scope="col"></th> 
  34.     <th scope="col"></th> 
  35.     <th scope="col"></th> 
  36.   </tr> 
  37. <?php page_rows(); ?>
  38. </table> 
  39. <?php
  40. } else {
  41. ?>
  42. <p><?php _e('No pages yet.') ?></p>
  43. <?php
  44. } // end if ($posts)
  45. ?> 
  46. <p><?php _e('Pages are like posts except they live outside of the normal blog chronology. You can use pages to organize and manage any amount of content.'); ?></p>
  47. <h3><a href="page-new.php"><?php _e('Create New Page'); ?> »</a></h3>
  48. </div> 
  49.  
  50.  
  51. <?php include('admin-footer.php'); ?> 
  52.